﻿<Window x:Class="BaMusaSoft.RPS.View.AddScheduleDetailWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:wpfExtended="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended" Title="إضافة دفعات تعهد"
        WindowStyle="ToolWindow" WindowStartupLocation="CenterScreen" FlowDirection="RightToLeft" Height="189" Width="489" 
		FontFamily="Simplified Arabic" FontSize="16" Loaded="WindowLoaded" Closing="WindowClosing">
  <Grid x:Name="LayoutGrid">
    <Grid.RowDefinitions>
      <RowDefinition Height="Auto" />
      <RowDefinition Height="Auto" />
    </Grid.RowDefinitions>
        <Grid x:Name="ContentGrid" Grid.Row="0" Margin="10,10,20,10" PreviewKeyDown="ContenGridKeyDown">
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition Width="0.4*"/>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition Width="0.6*"/>
      </Grid.ColumnDefinitions>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto" />
        <RowDefinition Height="Auto" />
      </Grid.RowDefinitions>
      <TextBlock Grid.Column="0" Grid.Row="0" Text="مبلغ الدفعة" VerticalAlignment="Center" Margin="3,5" />
      <TextBox Grid.Column="1" Grid.Row="0" x:Name="txtAmountDue" Text="{Binding AmountDue, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
               VerticalAlignment="Center" Height="35" Margin="3,5" />
      <TextBlock Grid.Column="2" Grid.Row="0" Text="تاريخ الدفعة" VerticalAlignment="Center" Margin="3,5" />
      <wpfExtended:MaskedTextBox Grid.Column="3" Grid.Row="0" IncludeLiterals="False" IncludePrompt="False"
                                 Value="{Binding Path=DateDue, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource DateConverter}, ValidatesOnDataErrors=True}"
                                 Mask="##/ ## /####" VerticalAlignment="Center" Height="35" Margin="3,5" />
      <TextBlock Grid.Column="0" Grid.Row="1" Text="ملاحظات" VerticalAlignment="Center" Margin="3,5" />
      <TextBox Grid.Column="1" Grid.Row="1" Grid.ColumnSpan="3"
               Text="{Binding Remarks, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" Height="35" Margin="3,5" />
    </Grid>
    <Grid x:Name="CommandsGrid" Grid.Row="1" Background="#FFF0F0F0" >
      <StackPanel Orientation="Horizontal"  HorizontalAlignment="Right" Margin="10,10,20,10">
        <Button Content="Add" Command="{Binding AddCommand}" IsDefault="True" Margin="5" />
        <Button Content="Close" Click="CloseButtonClick" IsCancel="True" Margin="5" />
      </StackPanel>
    </Grid>
  </Grid>
</Window>